/**
 * File: IndexReadController.java
 * Created by: mhaimel
 * Created on: 21 Jul 2009
 * CVS:  $Id: IndexReadController.java,v 1.2 2009/10/09 15:35:14 mhaimel Exp $
 */
package uk.ac.ebi.curtain.controller.writer;

import java.io.File;
import java.util.concurrent.atomic.AtomicInteger;

import uk.ac.ebi.curtain.controller.ParallelQueuedController;
import uk.ac.ebi.curtain.controller.SimpleReport;
import uk.ac.ebi.curtain.management.IControllerReport;
import uk.ac.ebi.curtain.processor.writer.impl.BatchIndexReadProcessor;

/**
 * @author mhaimel
 *
 */
public class IndexReadController extends ParallelQueuedController<File, File, BatchIndexReadProcessor> {
	
	private AtomicInteger iCnt = new AtomicInteger(0);

	@Override
	protected IControllerReport getReturnCall() {
		return new SimpleReport("Sumitted Index Reader for " + iCnt + " buckets!");
	}

	@Override
	protected BatchIndexReadProcessor buildController() {
		BatchIndexReadProcessor instance = getContext().getInjector().getInstance(BatchIndexReadProcessor.class);
		return instance;
	}
}
